﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using System.Windows.Media.Imaging;

namespace WPFTest
{
    class DivImageText:DivImage
    {
        private string text;

        public DivImageText(BitmapSource ImageFrame, int index,string text):base(ImageFrame, index)
        {
            this.text = text;
            this.id = "class_text";
        }
        public override void WriteContent(TextWriter tw, string out_path)
        {
            tw.WriteLine("<div id='class_text'>");
            tw.WriteLine(text);
            tw.WriteLine("</div>");
            tw.WriteLine("<div id='class_screenshot'>");
            tw.WriteLine("<img class='class_image' src='image_" + index.ToString() + ".png" + "' />");
            tw.WriteLine("</div>");

            SaveFrameToFile(out_path);
        }
    }
}
